PROGRAM main
  VAR
    // 输入信号
    iSignal AT %IW0 : INT;
    // 报警喇叭
    bAlarmSpeaker AT %QX2.0 : BOOL;
    // 延时定时器
    aTon : TON;
  END_VAR

  VAR CONSTANT
    // 延时时间
    tDelay : TIME := T#5s;
  END_VAR

aTon(IN := iSignal >= 100, PT := tDelay);
bAlarmSpeaker := aTon.Q;

END_PROGRAM
